Peer to peer (P2P) network protocols are used to exchange content among peers on a network. Generally one peer will be connected to a number of other peers. When a peer wants to find content, the peer transmits a query message to some of the peers it is connected to. This query message travels through the P2P network and elicits query responses from peers that have content that satisfies the query.
In a broadcasting model of P2P networks, a query is sent through the network by assigning it a Time-to-live (TTL) and broadcasting it to all connected peers. The connected peers decrement the TTL and broadcast it to all of their connected peers, and the query continues through the network in this fashion until the TTL reaches zero. This method works well when each peer is connected to a small number of other peers, and when there are few cycles in the network. However, the number of times the query is forwarded grows exponentially with the number of connected peers. For a peer that connects to thousands of other peers, broadcasting queries is not feasible, since the network would become congested with messaging traffic.
One method of resolving the possibility of network congestion is to maintain an index of the content available through each connection. Queries may then be forwarded to connections that have the content being searched for. However, keeping such an index may not be feasible. For example, due to the size of the index or the dynamic nature of the content.
Thus there is a need for a system and method to intelligently route queries to connected peers, without knowing the specific content available at each peer. The present invention addresses this need.